package com.example.brazil_project.service;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

/**
 * 开机启动监听器
 */
public class StartBroadcastReceiver extends BroadcastReceiver {
	private static final String ACTION = "android.intent.action.BOOT_COMPLETED";
	@Override
	public void onReceive(Context context, Intent intent) {
	
		   if (intent.getAction().equals(ACTION)){

               Intent i= new Intent(Intent.ACTION_RUN);
                 i.setClass(context, MsgService.class);
                 context.startService(i);
         }

	}

}
